All Questions
Tagged with cqrsdesign-patterns
25 questions
1vote
3answers
179views
How to handle authorization in CQRS
In a CQRS architecture, at least as implemented by Vaughn Vernon in IDDD_Samples, the query services lives in the application layer. But then where and how should authorization be handled? For example,...
3votes
3answers
1kviews
CQRS in a data heavy application involving a lot of CRUD
I've been developing a non-trivial personal application and I thought I'd use CQRS to learn it. The application is very data entry heavy, lots of entities and lots of forms. I find myself constantly ...
1vote
1answer
711views
How do I implement a domain entity behaviour that depends on some external infrastructure?
I am in the process of developing some software using CQRS, ES and DDD. A part of the system is writing services for controlling devices and collecting data from them. Consider a "Start" ...
-1votes
1answer
2kviews
How can I orchestrate multiple business tasks?
I have a WebApi backend with a Blazor WASM frontend. The application is split up into 3 main parts. Core, Infrastructure and Presentation. Basic onion architecture structure. Core.Domain Domain ...
0votes
1answer
380views
CQRS for avoiding heavy joins
I've been wondering about what is a perfect use case for CQRS where the benefits overcome the complexity and the cost with come with the package. So for me to better understand it, I want to share ...
-4votes
1answer
72views
What do you store first in a CQRS + ES architecture
I've recently started reading about CQRS, DDD and EventSourcing. From what I've read one of the best ways to do ES is to have an event store and then a regular DB or cache for easier querying. However,...
0votes
2answers
399views
Modify Command object inside decorator of CommandHandler(CQRS) or any other practice for avoiding duplication
Currently, we have multiple commands which share two same properties (BookName and ShopId). While handling those commands those properties must be validated with the help of some service. Let's say ...
2votes
1answer
1kviews
Determining an appropriate use case for CQRS
I'm building an application which lets users view a large amount of data about a single single entity (lets say it displays a users health profile for the day) via a single webpage. The data comes ...
3votes
2answers
3kviews
How to deal with UI data requirements in DDD
I'm using DDD and a CQRS/Event Sourcing architecture so my domain logic is separated in a microservice (e.g: command service) and the read side is in another microservice (e.g: query service). We ...
6votes
1answer
5kviews
CQRS command that needs to work with multiple aggregate roots
I have have a business process that receives an order request which also includes full customer information. In the cases where the external customer ID from that order request is not found in our DB,...
6votes
3answers
9kviews
Clean architecture, CQRS, and authentication?
I'm working on implementing my first clean architecture and CQRS application, I've stumbled across a bit of logic that's leaving me a bit stumped. I'm working on integrating authorization and ...
3votes
2answers
9kviews
In what layer are the DTOs stored with CQRS?
The Domain has the Domain Models. The Infrastructure layer has Commands and Queries, forming CQRS. Commands return Domain Models, and Queries return DTOs. In any API, the DTOs are stored in the ...
0votes
1answer
138views
How should "preparation" and "usage" of the same data be separated in a DDD application, if at all?
In most domains, there is an app that "prepares" data, and another app that "serves" the prepared data. The data, however, is from the same Core Domain, which causes some confusion in modeling. Some ...
3votes
4answers
1kviews
Too many unnecessary events
I'm new to eventsourced apps and since the beginning I'm facing an issue that I'm unsure how to resolve. I work in ecommerce and I always try to convey meaningful events to my aggregates like ...
7votes
2answers
10kviews
Can CQRS pattern exist without mediator pattern?
Can CQRS pattern exist and/or work without mediator pattern? I mean there are always commands and these commands have to be dispatched somehow to the handlers that perform some logic on them. Does ...